import 'package:bloc/bloc.dart';
import 'package:equatable/equatable.dart';

part 'main_event.dart';
part 'main_state.dart';

class MainBloc extends Bloc<MainEvent, MainState> {
  MainBloc() : super(MainInitial()) {
    on<MainEvent>((event, emit) {
      if(event is EatEvent){
        print('调用到了需要的值 ${event.foodName}');
        emit(MainEatState(event.foodName));
      }
    });
  }

}
